package com.gengzp.rpc.core.impl;

import com.gengzp.rpc.constants.RemoteTransactionalConstants;
import com.gengzp.rpc.core.RemoteTransactionalHandler;
import com.gengzp.rpc.model.dto.remoteTransaction.RemoteTransactionDto;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @ClassName RemoteTransactionalHandlerImplDefault
 * @Description 远程事务处理器默认实现类
 * @Author gengzp
 * @Date 2025/8/12 19:53
 */
@Component(value = RemoteTransactionalConstants.REMOTE_TRANSACTION_HANDLER_BEAN_NAME_DEFAULT)
public class RemoteTransactionalHandlerImplDefault implements RemoteTransactionalHandler {

    private static final Logger logger = LoggerFactory.getLogger(RemoteTransactionalHandlerImplDefault.class);

    @Override
    public void handleRemoteTransactionCallback(List<RemoteTransactionDto> remoteTransactions) {
        logger.info("当前远程事务执行失败, 需执行回滚逻辑, 请自行实现 com.gengzp.rpc.core.RemoteTransactionalHandler 接口");
    }

}
